package com.iwhalecloud.bss.kite.cucc.service.util;

import java.util.HashMap;
import java.util.Map;

import com.iwhalecloud.bss.kite.common.util.KiteMapUtils;
import com.iwhalecloud.bss.kite.dataservice.util.GeneralSwitchUtils;
import com.ztesoft.bss.common.util.ContextUtil;

public class InfServiceGrayUtils {

    @SuppressWarnings("deprecation")
    public static Map<String, String> genGrayInfoNode() {
        if (GeneralSwitchUtils.isSwitchOpened("GRAY_SERVER")) {
            Map<String, Object> extParams = ContextUtil.getLoginInfo().getUserInfo().getExtParams();
            if (KiteMapUtils.isNotEmpty(extParams) && extParams.containsKey("grayFlag")) {
                Map<String, String> grayInfo = new HashMap<String, String>();
                //grayInfo.put("VERSION", "2.21.3");
                //grayInfo.put("STAFF_ID", ContextUtil.getSimpleLoginInfo().getUserId().toString());
                //grayInfo.put("STAFF_ID", ContextUtil.getSimpleLoginInfo().getUserId().toString());
                //grayInfo.put("STAFF_CODE", ContextUtil.getLoginInfo().getStaffInfo().getStaffCode());
                grayInfo.put("PROVINCE_CODE", ContextUtil.getLoginInfo().getUserInfo().getPostProvinceNbr());
                //grayInfo.put("EPARCHY_CODE", ContextUtil.getLoginInfo().getUserInfo().getPostLanId());
                //grayInfo.put("CITY_CODE", ContextUtil.getLoginInfo().getUserInfo().getPostRegionId().toString());
                return grayInfo;
            }
        }
        return null;
    }
}
